<template>
	<view class="content" v-if="Object.keys(nowPlayingList).length!==0">
		<image 
		class="logo" 
		:src="nowPlayingList.subjects[0].images.small">
		</image>
		<!-- 按钮设置中空效果用plain -->
		<button 
		class="but" 
		plain size="s" 
		@click="topath">立即体验</button>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
			}
		},
		onReady() {
			this.$store.dispatch("getCity")
			// console.log(this.$store)
		},
		computed:{
			nowPlayingList(){
				// 判断对象是否为空的方法：Object.keys(nowPlayingList)
				// console.log(this.$store.state.nowPlayingList)
				return this.$store.state.nowPlayingList
			}
		},
		methods: {
			topath(){
				uni.redirectTo({
				    url: '../list/list'
				});
			}
			
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		position: fixed;
		top: 0;
		bottom:0;
		left: 0;
		right: 0;
			image{
				width: 100%;
				height: 100%;
			}
			.but{
				position: fixed;
				left: 50%;
				transform: translateX(-50%);
				bottom: 50px;
				color: black;
				border: none;
			}
		
	}

	
</style>
